package com.iov.car.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iov.car.mapper.TbDictionaryMapper;
import com.iov.car.domain.TbDictionary;
import com.iov.car.service.ITbDictionaryService;

/**
 * 字典Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-14
 */
@Service
public class TbDictionaryServiceImpl implements ITbDictionaryService 
{
    @Autowired
    private TbDictionaryMapper tbDictionaryMapper;

    /**
     * 查询字典
     * 
     * @param id 字典主键
     * @return 字典
     */
    @Override
    public TbDictionary selectTbDictionaryById(Long id)
    {
        return tbDictionaryMapper.selectTbDictionaryById(id);
    }

    /**
     * 查询字典列表
     * 
     * @param tbDictionary 字典
     * @return 字典
     */
    @Override
    public List<TbDictionary> selectTbDictionaryList(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.selectTbDictionaryList(tbDictionary);
    }

    /**
     * 新增字典
     * 
     * @param tbDictionary 字典
     * @return 结果
     */
    @Override
    public int insertTbDictionary(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.insertTbDictionary(tbDictionary);
    }

    /**
     * 修改字典
     * 
     * @param tbDictionary 字典
     * @return 结果
     */
    @Override
    public int updateTbDictionary(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.updateTbDictionary(tbDictionary);
    }

    /**
     * 批量删除字典
     * 
     * @param ids 需要删除的字典主键
     * @return 结果
     */
    @Override
    public int deleteTbDictionaryByIds(Long[] ids)
    {
        return tbDictionaryMapper.deleteTbDictionaryByIds(ids);
    }

    /**
     * 删除字典信息
     * 
     * @param id 字典主键
     * @return 结果
     */
    @Override
    public int deleteTbDictionaryById(Long id)
    {
        return tbDictionaryMapper.deleteTbDictionaryById(id);
    }

    @Override
    public List<TbDictionary> getCarMachine(Integer id) {
        return tbDictionaryMapper.getCarMachine(id);
    }

    @Override
    public List<TbDictionary> getCarBattery(Integer id) {
        return tbDictionaryMapper.getCarBattery(id);
    }

    @Override
    public List<TbDictionary> getList() {
        return tbDictionaryMapper.getList();
    }

    @Override
    public TbDictionary getCarType(Integer id) {
        return tbDictionaryMapper.getCarType(id);
    }

}
